<?php

namespace App\Listeners;

use App\Events\sessionevent;
use App\Events\userevent;
use App\libs\Db2;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;


class sessioneventlistener
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Handle the event.
     * 后台管理系统登陆成功之后缓存后台用户id
     * @param  userevent  $event
     * @return void
     */
    public function handle(sessionevent $event)
    {
        Session::put("mgid",$event->mgid);
    }
}
